@extends('admin.layout')

@section('content')
<div class="content-wrapper" style="min-height: 946px;">
  <!-- Content Header (Page header) -->
  <section class="content-header">
      <h1>
          商品管理
          <small>添加商品</small>
      </h1>
      <ol class="breadcrumb">
          <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
          <li><a href="#">商品管理</a></li>
          <li class="active">添加商品</li>
      </ol>
  </section>

  <!-- Main content -->
  <section class="content">
      <div class="row">
          <!-- left column -->
          <div class="col-md-12">
              <!-- general form elements -->
              <div class="box box-primary">
                  <div class="box-header with-border">
                      <h3 class="box-title">快速添加商品</h3>
                  </div><!-- /.box-header -->
                  <!-- form start -->
                  <form action = "{{ url('/admin/goods/insert') }}" method = "post" enctype="multipart/form-data">
                      {{ csrf_field() }}
                      <input type = "hidden" name = "pid" value = "{{ $id }}" />
                      <div class="box-body">
                          <div class="form-group">
                              <label for="exampleInputEmail1">商品名称</label>
                              <input name = "goodsname" class="form-control" id="exampleInputEmail1" placeholder="请输入商品名称" type="text">
                          </div>
                          <div class="form-group">
                              <label for="exampleInputPassword1">价格</label>
                              <input name = "price" class="form-control" id="exampleInputPassword1" placeholder="请输入价格" type="number">
                          </div>
                          <div class="form-group">
                              <label name = "color" for="exampleInputEmail1">颜色</label>
                              <input name = "color" class="form-control" id="exampleInputEmail1" placeholder="请输入商品颜色,中间以逗号隔开" type="text">
                          </div>
                          <div class="form-group">
                              <label name = "goodsnum" for="exampleInputEmail1">库存</label>
                              <input name = "goodsnum" class="form-control" id="exampleInputEmail1" placeholder="请输入库存数量" type="number">
                          </div>
                          <div class="form-group">
                              <label for="exampleInputPassword1">商品编码</label>
                              <input name = "coding" class="form-control" id="exampleInputPassword1" placeholder="请输入商品编码" type="number">
                          </div>
                          <div class="form-group">
                              <label for="exampleInputPassword1">优惠信息</label>
                              <input name = "coupon" class="form-control" id="exampleInputPassword1" placeholder="请输入优惠信息" type="text">
                          </div>
                          <div class="form-group">
                              <label for="exampleInputPassword1">制式</label>
                              <input name = "system" class="form-control" id="exampleInputPassword1" placeholder="请输入商品制式,中间以逗号隔开" type="text">
                          </div>
                          <div class="form-group">
                              <label for="exampleInputPassword1">容量</label>
                              <input name = "rom" class="form-control" id="exampleInputPassword1" placeholder="请输入容量,中间以逗号隔开" type="text">
                          </div>
                          <div class="form-group">
                              <label for="exampleInputPassword1">套餐</label>
                              <input name = "combo" class="form-control" id="exampleInputPassword1" placeholder="请输入套餐,中间以逗号隔开" type="text">
                          </div>
                          <div class="form-group">
                              <label for="exampleInputPassword1">商品描述</label>
                              <input name = "goodsdesc" class="form-control" id="exampleInputPassword1" placeholder="请添加描述" type="text">
                          </div>
                          <div class="form-group">
                              <label for="exampleInputFile">上传图片</label>
                              <input name = "goodspic" id="exampleInputFile" type="file">
                              <p class="help-block">请选择图片</p>
                          </div>
                          <div class="form-group">
                              <label for="exampleInputName">参数:</label>
                              <!-- 加载编辑器的容器 -->
                              <script style = "width:100%;" id="container" name="parameter" type="text/plain">
                              </script>
                              <!-- 配置文件 -->
                              <script type="text/javascript" src="{{ ('/ue/ueditor.config.js') }}"></script>
                              <!-- 编辑器源码文件 -->
                              <script type="text/javascript" src="{{ ('/ue/ueditor.all.js') }}"></script>
                              <!-- 实例化编辑器 -->
                              <script type="text/javascript">
                                  var ue = UE.getEditor('container',{
                                      toolbars: [
                                          ['fullscreen', 'source', 'undo', 'redo', 'bold']
                                      ],
                                      autoHeightEnabled: true,
                                      autoFloatEnabled: true
                                  });
                              </script>
                        </div>
                      </div><!-- /.box-body -->

                      <div class="box-footer">
                          <button type="submit" class="btn btn-primary">添加</button>
                      </div>
                  </form>
              </div><!-- /.box -->
          </div><!--/.col (left) -->
      </div>   <!-- /.row -->
  </section><!-- /.content -->
</div>
@endsection